package com.ljm.service;

import com.ljm.domian.CommonResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.math.BigDecimal;

/**
 * @author PengHuAnZhi
 * @createTime 2021/2/25 17:01
 * @projectName SpringCloudDemo
 * @className AccountService.java
 * @description TODO
 * 在nacos 找到 账户模块名称为  seata-account-service  下属的   对应连接
 */
@FeignClient(value = "seata-account-service")
public interface AccountService {

    /**
     * 减余额
     * @param userId
     * @param money
     * @return
     */
    @PostMapping(value = "/account/decrease")
    CommonResult decrease(@RequestParam("userId") Long userId, @RequestParam("money") BigDecimal money);
}
